import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class TextFiledPage extends StatefulWidget {
  const TextFiledPage({Key? key}) : super(key: key);

  @override
  _TextFiledPageState createState() => _TextFiledPageState();
}

class _TextFiledPageState extends State<TextFiledPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("TextFiled界面"),
      ),
      body: Padding(
        padding: EdgeInsets.all(10),
        child: Column(
          children: [
            TextField(),
            SizedBox(
              height: 20,
            ),
            TextField(
              maxLines: 1,
              decoration: InputDecoration(
                  hintText: '请输入搜索界面', border: OutlineInputBorder()),
            ),
            SizedBox(
              height: 20,
            ),
            TextField(
              obscureText: true,
              decoration: InputDecoration(
                  hintText: '请输入密码', border: OutlineInputBorder()),
            ),
            SizedBox(
              height: 20,
            ),
            TextField(
              decoration: InputDecoration(
                  hintText: '请输入用户名',
                  border: OutlineInputBorder(),
                  labelText: "用户名"),
            ),
            SizedBox(
              height: 20,
            ),
            TextField(
              decoration: InputDecoration(
                  icon: Icon(Icons.people),
                  hintText: '请输入密码',
                  labelText: "密码"),
            ),
          ],
        ),
      ),
    );
  }
}
